package router

import (
	"jgt-oper/src/context"
	"jgt-oper/src/logger"
	"jgt-oper/src/web"

	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// WebLogManageMap 注册日志管理路由映射
func WebLogManageMap(g *inject.Graph, router *gear.Router) {
	a := new(web.LogManage)
	err := g.Provide(&inject.Object{Value: a})
	if err != nil {
		logger.Default().Panic(err)
	}

	router.Get("/log_manages/page", context.WrapContext(a.QueryPage))
}
